package net.hn.hnms.biz.intelligence.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

import javax.sql.DataSource;

@Configuration
public class JdbcTemplateConfig {
    @Bean("jdbcTemplate")
    public JdbcTemplate jdbcTemplate(@Qualifier("dataSource") DataSource storyDataSource) {
        return new JdbcTemplate(storyDataSource);
    }

    @Bean("testJdbcTemplate")
    public JdbcTemplate testJdbcTemplate(@Qualifier("testDataSource") DataSource testDataSource) {
        return new JdbcTemplate(testDataSource);
    }

    @Bean("supportJdbcTemplate")
    public JdbcTemplate supportJdbcTemplate(@Qualifier("supportDataSource") DataSource supportDataSource) {
        return new JdbcTemplate(supportDataSource);
    }
}
